package com.hua.springCloud.feignController;

import com.hua.springCloud.entities.CommonResult;
import com.hua.springCloud.entities.Payment;
import com.hua.springCloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignControllerTest {
    @Autowired
    private PaymentService paymentService;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id")Long id){
        return paymentService.getPaymentById(id);
    }
    @GetMapping("/consumer/getTiemOut")
    public String getTiemOut(){
        return paymentService.getTiemOut();
    }
}
